package com.cms.pms.aggregator;

import java.util.HashMap;
import java.util.Map;

import com.cms.pms.Transaction;

public class SimpleConverter implements Converter {
	
	Map<String, String> mapping = new HashMap<String, String>();
	
	
	public Map<String, String> getMapping() {
		return mapping;
	}

	public void setMapping(Map<String, String> mapping) {
		this.mapping = mapping;
	}

	@Override
	public String getMetric(Object obj) {
		String key=(String)obj;
		String value=mapping.get(key);
		return value !=null ? value : key;
	}

}
